﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Web.Caching;
using Com.queryzer2.Domain.Entities;
using Com.queryzer2.Services.Base;
using Com.queryzer2.Cache;
using Com.queryzer2.Services.Interface;

namespace Com.queryzer2.Services.Impl
{
    public class GestioneInserimentoServices : BaseSingleton<GestioneInserimentoServices>, IGestioneInserimentoServices
    {

        #region IGestioneInserimentoServices Members

        public GEP_TESTATA loadPratica_ByCode(decimal tes_Cod_Pratica, bool withPhases)
        {
            GEP_TESTATA t = null;
            if (!withPhases)
                t= base.DbProvider.DaoImpl.PraticaDao.GetById(tes_Cod_Pratica);
            else
            {
                t = base.DbProvider.DaoImpl.PraticaDao.GetById(tes_Cod_Pratica);
                t.Gep_fase = base.DbProvider.DaoImpl.FasePraticaDao.GetByPraticaId(tes_Cod_Pratica);
            }
            return t;
        }

        #endregion
    }
}